﻿using ProTrack.Entity;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace ProTrack.IServices.Product
{
    /// <summary>
    /// 型号业务逻辑层接口
    /// </summary>
    public interface IModelServices
    {
        /// <summary>
        /// 获取所有型号信息
        /// </summary>
        /// <returns></returns>
        public Task<IEnumerable<Model>> GetAllAsync();
        /// <summary>
        /// 根据页码，页大小，编号和名称获取型号信息
        /// </summary>
        /// <param name="PageIndex">页码</param>
        /// <param name="PageSize">页大小</param>
        /// <param name="Number">型号编号</param>
        /// <param name="Name">型号名称</param>
        /// <returns></returns>
        public Task<IEnumerable<Model>> GetAsync(int PageIndex, int PageSize, string Number, string Name);
        /// <summary>
        /// 根据编号和名称获取型号数量
        /// </summary>
        /// <param name="Number">型号编号</param>
        /// <param name="Name">型号名称</param>
        /// <returns></returns>
        public Task<int> GetCountAsync(string Number, string Name);
        /// <summary>
        /// 更新型号信息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public Task<bool> UpdateAsync(Model model);
        /// <summary>
        /// 新增型号
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public Task<bool> AddAsync(Model model);
        /// <summary>
        /// 批量删除型号
        /// </summary>
        /// <param name="Ids"></param>
        /// <returns></returns>
        public Task<bool> DeleteAsync(int[] Ids);
        /// <summary>
        /// 删除指定型号
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public Task<bool> DeleteAsync(int Id);
    }
}
